﻿// See https://aka.ms/new-console-template for more information
//如何让引用类型像值类型一样的参数传递
//引用类型：结构体，枚举，布尔，整数，浮点，char
//值类型：类，接口，委托，数组

using System.Collections;

int a = 123;
int b = 456;
b = a;
b = 789;
testmodel obj = new();

List<int> testlist = [1, 2, 3, 4, 5];
var blist = new List<int>(testlist);

blist[2] = 123;

foreach (var item in blist)
{
    Console.WriteLine(item);
}

testmodel obj1 = new();
obj1.id = 1;
obj1.name = "我是1";
testmodel obj2 = new();
obj2.id = 2;
obj2.name = "我是二";

List<int> list1 = [1, 2, 3, 4, 5];
List<int> list2 = [6, 7, 8, 9];
Console.WriteLine("Hello, World!");
internal class testmodel
{
    public int id { get; set; }
    public string name { get; set; }
}
